package org.orz.story.pms.biz.service;

import com.github.pagehelper.Page;
import org.orz.story.pms.biz.model.req.*;
import org.orz.story.pms.biz.model.resp.ListApiByPermissionIdResp;
import org.orz.story.pms.biz.model.resp.ListApiInfoWithPermitStatusResp;
import org.orz.story.pms.biz.persistence.entities.PmsApi;

import java.util.List;

public interface PmsApiService {
    /**
     * 分页查询api接口信息
     */
    Page<PmsApi> listApiInfo(ListApiInfoReq req);

    /**
     * 根据权限id查询接口集合
     */
    Page<ListApiInfoWithPermitStatusResp> listApiInfoWithPermitStatus(ListApiInfoWithPermitStatusReq req);

    /**
     * 根据权限id查询已经分配的接口集合
     */
    List<PmsApi> listApiByPermissionId(ListApiByPermissionIdReq req);

    /**
     * 新增接口
     */
    void addApi(AddApiReq req);

    /**
     * 修改接口
     */
    void updateApi(UpdateApiReq req);

    /**
     * 删除接口
     */
    void deleteApi(DeleteApiReq req);
}
